class Dog:
    legs_num = 4
    has_hair = True
    has_tail = True

    def bark(self):
        print("狗狂吠")

    def bite(self):
        print("狗咬人")

    def fetch(self):
        print("狗捡球")

alex = Dog()
peiQi = Dog()
# print(id(alex))
# print(id(peiQi))
# print(alex == peiQi)
alex.name = "李杰"
alex.age = 10

print(alex.name)
peiQi.name = "武大郎"
peiQi.age = 8
print(peiQi.name)

alex.age = 30
print(alex.age)

alex.bark()
alex.bark = 1000
print(alex.bark)
print(peiQi.bark)